﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace jacDigitalDrum
{
    /// <summary>
    /// Interaction logic for Jitem.xaml
    /// </summary>
    public partial class Jitem : UserControl
    {
        internal string sound;
        public Jitem()
        {
            InitializeComponent();
            this.bt_Play.Click += new RoutedEventHandler(bt_Play_Click);
        }

        void bt_Play_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Forms.OpenFileDialog od = new System.Windows.Forms.OpenFileDialog();
            od.Filter = "wavFile|*.wav";
            od.Multiselect = false;
            if (od.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                sound = od.FileName;
                tbk_sound.Text = System.IO.Path.GetFileName(sound);
            }
        }
    }
}
